<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />  
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<title>后台管理</title>
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />


</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了网站企业会员后台充值。</div>
<div class="admin_new_tip_list">注意事项： 充值时，请正确填写要充值的{yun:}$config.integral_pricename{/yun}。</div>
</div>
</div>

<div class="infoboxp_top mt10">
<h6>后台充值</h6>
    <a href="javascript:history.back();" class="admin_new_cz_tj">返回</a>
</div>
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
  <div class="admin_table_border">
<form name="myform" action="index.php?m=admin_company&c=morderadd" method="post"  target="supportiframe" onSubmit="return check()" class="layui-form">
	<table width="100%" class="table_form">
	    <tr class="admin_table_trbg">
			<th width="140">充值用户名：</th>
			<td><input class="input-text" type="text" name="username" size="40" value="{yun:}$user.username{/yun}" disabled="disabled" style="background:#E0E0E0;"/></td>
		</tr> 
        <tr class="admin_table_trbg">
			<th width="140">充值方式：</th>
			<td>
        <div class="layui-form-item">
          <div class="layui-input-input">
            <input name="fs_switch" lay-skin="switch" lay-text="增加|扣除" type="checkbox" lay-filter="fs_switch" checked />
          </div>
        </div>
        <input type="hidden" name="fs" id="fs" value="1" />
		  </td>
		</tr>
        <tr class="int" id="integral_tr">
            <th height="30">{yun:}$config.integral_pricename{/yun}：</th>
            <td>
            <input type="text" name="price_int" id="price_int" size="20" maxlength="16" value="" onKeyUp="this.value=this.value.replace(/[^0-9.]/g,'')"   class="input-text"> {yun:}$config.integral_priceunit{/yun}</td>
        </tr> 
          <tr class="admin_table_trbg">
            <th height="30" >备　　注：</th>
            <td><textarea name="remark" rows=2 cols=40 wrap="physical" class="admin_comdit_textarea"></textarea></td>
        </tr>
		<tr>
        <th></th>
			<td>
    		<input class="admin_button" type="submit" name="insert" value="&nbsp;充　值&nbsp;" />
			</td>
		</tr>
	</table>
	<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
	<input type="hidden" name="uid" value="{yun:}$user.uid{/yun}">
</form>
</div>
</div>

<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script> 

<script> 
$(document).ready(function(){
  $("input[name=type]").click(function(){
    var type = $(this).val();
    if(type=="integral"){
      $("#integral_tr").show();
      $("#price_tr").hide();
    }else{
      $("#integral_tr").hide();
      $("#price_tr").show();
    }
  });
   $('input').iCheck({
    checkboxClass: 'icheckbox_flat-blue',
    radioClass: 'iradio_flat-blue'
    });
});
function check(){
  if($("#price_int").val()<1){
    parent.layer.msg('请输入{yun:}$config.integral_pricename{/yun}！', 2,8);return false;
  }
}

layui.use(['form'], function(){
  var form = layui.form;

  form.on('switch(fs_switch)', function(data){
    var v = this.checked ? 1 : 2;
    $("#fs").val(v);
  });
});
</script>

</body>
</html>